﻿<%@ Page Language="C#" MasterPageFile="~/Game/GameTools/GameTool.Master" AutoEventWireup="true" CodeBehind="IntelTool.aspx.cs" Inherits="smallDeimos.Game.GameTools.IntelTool" Title="Small Deimos - Intel tool" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataSourceID="ObjectDataSource1">
        <Columns>
            <asp:BoundField DataField="PlayerName" HeaderText="PlayerName" 
                SortExpression="PlayerName" />
            <asp:BoundField DataField="DateOfScan" HeaderText="DateOfScan" 
                SortExpression="DateOfScan" />
            <asp:BoundField DataField="Attack" HeaderText="Attack" 
                SortExpression="Attack" />
            <asp:BoundField DataField="Defense" HeaderText="Defense" 
                SortExpression="Defense" />
            <asp:BoundField DataField="Speed" HeaderText="Speed" SortExpression="Speed" />
            <asp:BoundField DataField="Culture" HeaderText="Culture" 
                SortExpression="Culture" />
            <asp:BoundField DataField="Production" HeaderText="Production" 
                SortExpression="Production" />
            <asp:BoundField DataField="Science" HeaderText="Science" 
                SortExpression="Science" />
            <asp:BoundField DataField="Growth" HeaderText="Growth" 
                SortExpression="Growth" />
            <asp:BoundField DataField="Biology" DataFormatString="{0:F3}" 
                HeaderText="Biology" SortExpression="Biology" />
            <asp:BoundField DataField="Economy" DataFormatString="{0:F3}" 
                HeaderText="Economy" SortExpression="Economy" />
            <asp:BoundField DataField="Energy" DataFormatString="{0:F3}" 
                HeaderText="Energy" SortExpression="Energy" />
            <asp:BoundField DataField="Math" DataFormatString="{0:F3}" HeaderText="Math" 
                SortExpression="Math" />
            <asp:BoundField DataField="Physics" DataFormatString="{0:F3}" 
                HeaderText="Physics" SortExpression="Physics" />
            <asp:BoundField DataField="Social" DataFormatString="{0:F3}" 
                HeaderText="Social" SortExpression="Social" />
            <asp:BoundField DataField="CurrentCulture" DataFormatString="{0:F3}" 
                HeaderText="CurrentCulture" SortExpression="CurrentCulture" />
        </Columns>
        <EmptyDataTemplate>
            You can&#39;t scan any players. Sorry.
        </EmptyDataTemplate>
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        SelectMethod="GetIntelForPlayer" TypeName="SD.Database.DataAccess">
        <SelectParameters>
            <asp:CookieParameter CookieName="sd_id" Name="pId" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:smallDeimosConnectionString %>" 
        SelectCommand="SELECT Players.PlayerName, Intel.DateOfScan, Intel.Attack, Intel.Defense, Intel.Speed, Intel.Culture, Intel.Production, Intel.Science, Intel.Growth, Intel.Biology, Intel.Economy, Intel.Energy, Intel.Math, Intel.Physics, Intel.Social, Intel.CurrentCulture FROM Intel INNER JOIN Players ON Players.PlayerId = Intel.pId1 WHERE (Intel.pId = @activePlayer)">
        <SelectParameters>
            <asp:CookieParameter CookieName="sd_id" Name="activePlayer" />
        </SelectParameters>
    </asp:SqlDataSource>
</asp:Content>
